<?php
/**
 * Layout
 * @author Micou13630
 *
 */
class Layout extends Canvas implements IRenderable {

	protected $align;

	protected $vertical;

	protected $layoutMargin;
	protected $layoutBottomMargin;
	protected $layoutLeftMargin;
	protected $layoutRightMargin;
	protected $layoutTopMargin;

	protected $membersMargin;
	protected $minMemberSize;

	protected $leaveScrollbarGap;

	protected $overflow;

	protected $members;

	protected $canDropComponents;


	/**
	 * Constructeur
	 */
	public function Layout() {
		parent::Canvas();

		$this->members = array();
	}
	
	/**
	 * Enter description here ...
	 * @param IRenderable $member
	 */
	public function addMember(IRenderable $member) {
		$this->members[] = $member;
	}

	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return get_class($this);
	}

	/**
	 * Implementation de scLog
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}

	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		ScCollectionLog::getInstance()->addSc(new ScLog($this->object(), get_object_vars($this)));
	}
	
	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		$this->scLog();
		return "isc.".$this->object().".create({".$this->properties()."})";
	}
}
?>